package com.xiayong.dto;

import java.io.Serializable;

public class Pager implements Serializable {
    public static final String SORTORDER_ASC = "ASC";
    public static final String SORTORDER_DESC = "DESC";

    /**
     * data
     */
    private Serializable data;

    /**
     * serialVersionUID.
     */
    private static final long serialVersionUID = 6852642641753945273L;

    private Serializable cells;

    /**
     * total
     */
    private int total;

    /**
     * page
     */
    private int page;

    /**
     * rp
     */
    private int rp;

    /**
     * sortname
     */
    private String sortname;

    /**
     * sortorder
     */
    private String sortorder;

    /**
     * queryType
     */
    private String qtype;

    /**
     * Query String
     */
    private String query;

    /**
     * 
     */
    public Pager() {
        super();
        this.sortorder = Pager.SORTORDER_ASC;
    }

    /**
     * @param total
     * @param page
     * @param sortName
     * @param sortOrder
     * @param queryType
     * @param queryString
     */
    public Pager(final int total, final int page, final int rp, final String sortName, final String sortOrder,
            final String queryType, final String queryString, final Serializable data, final Serializable cells) {
        super();
        this.total = total;
        this.page = page;
        this.rp = rp;
        this.sortname = sortName;
        this.sortorder = sortOrder;
        this.qtype = queryType;
        this.query = queryString;
        this.data = data;
        this.cells = cells;
    }

    /**
     * @return the cells
     */
    public final Serializable getCells() {
        return this.cells;
    }

    /**
     * @return the data
     */
    public final Serializable getData() {
        return this.data;
    }

    /**
     * @return the page
     */
    public final int getPage() {
        return this.page;
    }

    /**
     * @return the Query Type
     */
    public final String getQtype() {
        return this.qtype;
    }

    /**
     * @return the Query String
     */
    public final String getQuery() {
        return this.query;
    }

    /**
     * @return the rp
     */
    public final int getRp() {
        return this.rp;
    }

    /**
     * @return the sortName
     */
    public final String getSortname() {
        return this.sortname;
    }

    /**
     * @return the sortOrder
     */
    public final String getSortorder() {
        return this.sortorder;
    }

    /**
     * @return the total
     */
    public final int getTotal() {
        return this.total;
    }

    /**
     * @param cells
     *            the cells to set
     */
    public final void setCells(final Serializable cells) {
        this.cells = cells;
    }

    /**
     * @param data
     *            the data to set
     */
    public final void setData(final Serializable data) {
        this.data = data;
    }

    /**
     * @param page
     *            the page to set
     */
    public final void setPage(final int page) {
        this.page = page;
    }

    /**
     * @param queryType
     *            the Query Type to set
     */
    public final void setQtype(final String queryType) {
        this.qtype = queryType;
    }

    /**
     * @param queryString
     *            the Query String to set
     */
    public final void setQuery(final String queryString) {
        this.query = queryString;
    }

    /**
     * @param rp
     *            the rp to set
     */
    public final void setRp(final int rp) {
        this.rp = rp;
    }

    /**
     * @param sortName
     *            the sortName to set
     */
    public final void setSortname(final String sortName) {
        this.sortname = sortName;
    }

    /**
     * @param sortOrder
     *            the sortOrder to set
     */
    public final void setSortorder(final String sortOrder) {
        this.sortorder = sortOrder;
    }

    /**
     * @param total
     *            the total to set
     */
    public final void setTotal(final int total) {
        this.total = total;
    }

    @Override
    public String toString() {
        return new StringBuilder("[page:").append(this.page).append(", total:").append(this.total).append(", rp:")
                .append(this.rp).append(", qtype:").append(this.qtype).append(", query:").append(this.query)
                .append(", sortname:").append(this.sortname).append(", sortorder:").append(this.sortorder).append("]")
                .toString();
    }
}
